<div wire:poll.5000ms>
    <div  id="chat_history">
    <x-bladewind.list-view compact="true" id="command-list" transparent="true">
        @foreach($this->commands as $command)
            <div x-intersect.half="$wire.loadMore()">
                <x-bladewind.list-item  class="bg-primary text-white">
                    <div class="ml-3">
                        <div class="text-sm font-medium text-slate-900 ">
                            {{ $command['command'] }}
                        </div>
                        <div class="text-sm text-slate-500 truncate">
                            {{ date('Y-m-d H:i:s', $command['time']) }}
                        </div>
                    </div>
                </x-bladewind.list-item>
                <x-bladewind.list-item class="{{ $command->response->success == 1 ? 'bg-green-500' : 'bg-red-500'}} text-white">
                    <div class="ml-3">
                        <div class="text-sm font-medium text-slate-900">
                            {!!  nl2br(e($command->response->response)) !!}
                        </div>
                    </div>
                </x-bladewind.list-item>
            </div>
        @endforeach
    </x-bladewind.list-view>

</div>
    <div>
        Время сессии - {{ date("Y-m-d H:i:s", $this->session->start_time) }} - {{ $this->session->end_time == null ? "Н.В." : date("Y-m-d H:i:s", $this->session->end_time)}}
    </div>

    <div>
        Всего команд: {{ count($this->commandsInfo) }}
    </div>
</div>
